home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Environments / RAMSES 2.2 / RAMSES 2.2 Extras / AuxLibExtra .DEF / MatSclOps.DEF < prev    next >
Encoding:
Modula Definition  |  1996-06-21  |  1.9 KB  |  77 lines  |  [TEXT/MEDT]

  1. DEFINITION MODULE MatSclOps;
  2.  
  3.   (*******************************************************************
  4.  
  5.     Module  MatSclOps     (Version 1.0)
  6.  
  7.               Copyright ©1993 by Olivier Roth, Andreas Fischlin, 
  8.               and Swiss Federal Institute of Technology Zürich ETHZ 
  9.  
  10.       Purpose: provides some simple matrix operations, like
  11.                addition, subtraction, multiplication.
  12.                
  13.       Remarks: for real matrix operations see MatrixVecOps
  14.       
  15.                  This modulde is part of the Mat-library, which forms 
  16.                  part of the RAMSES package.
  17.               
  18.       Programming
  19.  
  20.           o Design and Implementation
  21.               O. Roth             15.11.89
  22.               A. Fischlin            28/05/93
  23.  
  24.               
  25.           Systems Ecology Group
  26.           Swiss Federal Institute of Technology Zurich ETHZ
  27.           Department of Environmental Sciences
  28.           Grabenstr. 3
  29.           CH-8952 Schlieren/Zurich
  30.           Switzerland
  31.  
  32.           Last revision of definition:  28/05/93 af
  33.  
  34.   *******************************************************************)
  35.  
  36.   FROM Matrices IMPORT Matrix;
  37.  
  38.  
  39.   VAR
  40.     matrixSclOpsOk: BOOLEAN; (* returns success of operation *)
  41.  
  42.  
  43.   PROCEDURE AddVecToMatrixRow( v: Matrix;
  44.                                m: Matrix;  irow: INTEGER );
  45.  
  46.   PROCEDURE AddVecToMatrixCol( v: Matrix;
  47.                                m: Matrix;  icol: INTEGER );
  48.  
  49.  
  50.   PROCEDURE ColSum  ( a: Matrix;   VAR rowVec: Matrix );
  51.  
  52.   PROCEDURE RowSum  ( a: Matrix;   VAR colVec: Matrix );
  53.  
  54.   PROCEDURE TotSum  ( a: Matrix ): REAL;
  55.  
  56.  
  57.   PROCEDURE DiagVec ( a: Matrix;   VAR r: Matrix );
  58.  
  59.   PROCEDURE DiagSum ( a: Matrix ): REAL;
  60.  
  61.   PROCEDURE DiagProd( a: Matrix ): REAL;
  62.  
  63.  
  64.   PROCEDURE EqualMatrix( a, b: Matrix;  maxErr: REAL ): BOOLEAN;
  65.  
  66.  
  67.   PROCEDURE ScalarMul( a: Matrix; scal: REAL );
  68.  
  69.   PROCEDURE ScalarDiv( a: Matrix; scal: REAL );
  70.  
  71.  
  72.   PROCEDURE ScalarVecProd( a, b: Matrix ): REAL;
  73.   (* a and b must have dimensions 1 x n and n x 1 resp. *)
  74.  
  75.  
  76. END MatSclOps.
  77.